package com.pls.mapper;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;

import com.pls.entity.Project;

public class ProjectMapper implements Mapper<Project>{

	@Override
	public List<Project> MapList(ResultSet rs) throws SQLException {
		List<Project> projectList = new ArrayList<Project>();
		Project project = null;
		while(rs.next()){
			project = new Project();
			project.setId(rs.getInt("project_id"));
			project.setProjectCode(rs.getString("project_code"));
			project.setProjectDescription(rs.getString("project_desc"));
			
			projectList.add(project);
		}
		
		return projectList;
	}

	@Override
	public Project Map(ResultSet rs) throws SQLException {
		// TODO Auto-generated method stub
		return null;
	}

}
